package com.springdemo.annother.parseexcel;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.IndexedColors;

public class PhoneTest1 {
	static String filePath = "D:\\t_poi_shop_source(2).xls";
	static List<String> lists = ExcelUtil.parseExcel(filePath);
	static List<String> lists1 = ExcelUtil.parseExcel(filePath);
    private static final String str = "市";
	public static void main(String[] args) {
    	for(int i1 = 1;i1 < lists1.size();i1++){
    		HSSFWorkbook wb = new HSSFWorkbook();
    		HSSFCellStyle style = wb.createCellStyle();
    		 String query = lists1.get(i1).replace(str, "");
 		    ArrayList<String> cityList = new ArrayList<String>();
 		    cityList.add(query);
 		    MyTest ts = new MyTest();
//     		Map<String, String> s = ts.getQuhao(query);
     		//System.out.println(s);
     		//遍历map的key和value
     		Map<String,String> map = new HashMap<String, String>();
     		Iterator<Entry<String,String>> iter = map.entrySet().iterator();
     		  while(iter.hasNext()){
     		   Entry<String,String> entry = iter.next();
     		   String key = entry.getKey();
     		   String value = entry.getValue();
     		   System.out.println(key+" "+value);
     		   System.out.println(value);
     		  }
    		System.out.println(lists.get(i1).substring(0, 4));
    		if(lists.get(1)==null){
    			style.setFillForegroundColor(IndexedColors.DARK_BLUE.getIndex());
    			System.out.println("着色成功");
        	}else{
        		style.setFillForegroundColor(IndexedColors.DARK_BLUE.getIndex());
        		System.out.println("着色成功");
        	}
    	}
    	/*for(int i1 = 1;i1 < lists1.size();i1++){
		    String query = lists1.get(i1).replace(str, "");
		    ArrayList<String> cityList = new ArrayList<String>();
		    cityList.add(query);
		    Test1 ts = new Test1();
    		Map<String, String> s = ts.getQuhao(query);
    		System.out.println(s);
    	
    		
    		}*/
    		
    	
	}

	
}
